package com.tony.easymvc.core.bean;

import java.util.List;
import java.util.Map;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.tony.easymvc.po.OrMapping;

public class ConfigModel {

	private String parentProjectPath;

	private String parentTmplName;

	private ProjectModel project;

	private String mapperPath;

	private String bizServicePath;

	private String bizServiceImplPath;

	private String xmlPath;

	private String webappPath;

	private Map<String, List<OrMapping>> mappings;

	private String controllerPath;

	private String annotationPackage;
	
	private String poPath;

	private Map<ModuleConfig, List<ModuleModel>> modules = Maps.newHashMap();

	public String getParentProjectPath() {
		return parentProjectPath;
	}

	public void setParentProjectPath(String parentProjectPath) {
		this.parentProjectPath = parentProjectPath;
	}

	public Map<ModuleConfig, List<ModuleModel>> getModules() {
		return modules;
	}
	
	public void addModules(ModuleModel mm) {
		if(!modules.containsKey(mm.getType())) {
			modules.put(mm.getType(), Lists.newArrayList());
		}
		modules.get(mm.getType()).add(mm);
	}
	

	public String getParentTmplName() {
		return parentTmplName;
	}

	public void setParentTmplName(String parentTmplName) {
		this.parentTmplName = parentTmplName;
	}

	public ProjectModel getProject() {
		return project;
	}

	public void setProject(ProjectModel project) {
		this.project = project;
	}

	public String getMapperPath() {
		return mapperPath;
	}

	public void setMapperPath(String mapperPath) {
		this.mapperPath = mapperPath;
	}

	public String getXmlPath() {
		return xmlPath;
	}

	public void setXmlPath(String xmlPath) {
		this.xmlPath = xmlPath;
	}

	public Map<String, List<OrMapping>> getMappings() {
		return mappings;
	}

	public void setMappings(Map<String, List<OrMapping>> mappings) {
		this.mappings = mappings;
	}

	public String getControllerPath() {
		return controllerPath;
	}

	public void setControllerPath(String controllerPath) {
		this.controllerPath = controllerPath;
	}

	public String getAnnotationPackage() {
		return annotationPackage;
	}

	public void setAnnotationPackage(String annotationPackage) {
		this.annotationPackage = annotationPackage;
	}

	public String getWebappPath() {
		return webappPath;
	}

	public void setWebappPath(String webappPath) {
		this.webappPath = webappPath;
	}

	public String getBizServicePath() {
		return bizServicePath;
	}

	public void setBizServicePath(String bizServicePath) {
		this.bizServicePath = bizServicePath;
	}

	public String getBizServiceImplPath() {
		return bizServiceImplPath;
	}

	public void setBizServiceImplPath(String bizServiceImplPath) {
		this.bizServiceImplPath = bizServiceImplPath;
	}

	public String getPoPath() {
		return poPath;
	}

	public void setPoPath(String poPath) {
		this.poPath = poPath;
	}

}
